<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../JS/2020-12-29.js"></script>
</head>

<body>
    <!-- <div id="content">
        文本 <input type="text" id="email">
        <p></p>
        <label><input type="radio" name="weekday" id="monday" value="1"> Monday</label>
        <label><input type="radio" name="weekday" id="tuesday" value="2"> Tuesday</label>

        <input type="date" value="2020-12-29">

        2015/07/01
        <input type="datetime-local" value="2015-07-01T02:03:04">

        2015/07/01 02:03:04
        <input type="color" value="#ff0000">
    </div> -->

    <!-- <form id="login-form" method="post" onsubmit="return checkForm()">
        账号：<input type="text" id="username" name="username">
        密码：<input type="password" id="input-password">
        <input type="hidden" id="md5-password" name="password">
        <button type="submit">Submit</button>
    </form> --> 
     <form id="test-register" action="#" target="_blank" onsubmit="return checkRegisterForm()">
        <p id="test-error" style="color:red"></p>
        <p>
            用户名: <input type="text" id="username" name="username">
        </p>
        <p>
            口令: <input type="password" id="password" name="password">
        </p>
        <p>
            重复口令: <input type="password" id="password-2">
        </p>
        <p>
            <button type="submit">提交</button> <button type="reset">重置</button>
        </p>
    </form>

</body>
<script>
    function checkForm() {
        var input_pwd = document.getElementById('input-password');
        var md5_pwd = document.getElementById('md5-password');
        // 把用户输入的明文变为MD5:
        md5_pwd.value = toMD5(input_pwd.value);
        // 继续下一步:
        return true;
    }
</script>

</html>